<template>
	<view class="">
		<view class="fllow_form">
			<view>名称<text>*</text></view>
			<view class="form_right">{{info.name}}</view>
		</view>
		<view class="fllow_form">
			<view>编号<text>*</text></view>
			<view class="form_right">{{info.number}}</view>
		</view>
		<view class="fllow_form">
			<view>库管<text>*</text></view>
			<view class="form_right">{{info.staff?info.staff.name:''}}</view>
		</view>
		<view class="fllow_area">
			<view class="area_head">地址</view>
			<view class="textarea">
				{{info.address}}
			</view>
		</view>
		
		<view class="bottom_nav" @click="toEdit">
			<view class="">修改</view>
		</view>
	</view>
</template>

<script>
	import { netWarehousDetail } from '@/api/api.js'
	
	export default{
		data() {
			return{
				id:'',
				info:{}
			}
		},
		onLoad(options) {
			this.id = options.id
		},
		onShow() {
			this.getDetail()
		},
		methods:{
			getDetail() {
				netWarehousDetail({id:this.id}).then(res=>{
					this.info = res.data
				})
			},
			toEdit() {
				uni.navigateTo({
					url:'/pagesB/warehouse/editWarehouse?id='+this.id
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.fllow_form {
		box-sizing: border-box;
		display: flex;
		justify-content: space-between;
		height: 100rpx;
		line-height: 100rpx;
		background-color: #fff;
		border-bottom: 1rpx solid #EAEAEA;
		padding-left: 30rpx;
		color: #999;
		font-size: 32rpx;
		.form_right {
			display: flex;
			color: #333;
			font-size: 32rpx;
			padding-right: 30rpx;
			.ri_label{
				color:#999;
			}
			image {
				width: 40rpx;
				height: 40rpx;
				margin: 28rpx 5rpx 0 0;
			}
		}
		text {
			color: #f00;
			margin-left: 10rpx;
		}
	}
	.fllow_area {
		background-color: #fff;
		margin-bottom: 30rpx;
		padding-bottom: 30rpx;
		color: #999;
		.area_head {
			height: 100rpx;
			line-height: 100rpx;
			font-size: 32rpx;
			padding: 0 45rpx;
			text {
				color: #f00;
			}
		}
		.textarea {
			width: 80%;
			height: 300rpx;
			padding: 30rpx;
			background: #f8f8f8;
			margin: 0 auto;
		}
	}
	.bottom_nav {
		position: fixed;
		bottom: 0;
		left: 0;
		right: 0;
		padding: 30rpx 0;
		background-color: #fff;
		text-align: center;
		color: $uni-text-color;
		display: flex;
		justify-content: center;
		align-items: center;
		z-index: 9;
		border-top:1rpx solid #f5f5f5;
	}
</style>